package com.gzhryc.shared_device.oem.code.user.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.JoinField;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.pay.enums.ReceivingMoneyType;
import com.gzhryc.shared_device.base.enums.EPayType;
import com.gzhryc.shared_device.oem.code.user.dao.enums.UserTransferMoneyOrderEnum;

import java.util.Date;

/**
 * 用户提现订单
 * @version 2022-12-23
 */
@Table(name="user_transfer_money_order")
public class UserTransferMoneyOrder {

    @Id(auto = false)
    @Column(name = "trade_no")
    protected String tradeNo;

    @Column(name = "user_id", notNull = true)
    protected Long userId;

    @Column(name = "account_group_id", notNull = true, note = "账号组ID")
    protected Long accountGroupId;

    @Column(name = "user_name",note = "用户姓名")
    protected String userName;

    @Column(name = "user_phone",note = "用户手机号")
    protected String userPhone;

    @Column(name = "money", notNull = true,note = "提现金额")
    protected Integer money;

    @Column(name = "profit_proportion",notNull = true,defVal = "0.0",note = "提现手续费比例")
    protected Double profitProportion;

    @Column(name = "receipt_money", notNull = true,note = "实收金额")
    protected Integer receiptMoney;

    @Column(name = "pay_type", notNull = true, defVal = "2",note = "支付类型")
    protected Integer payType;

    @Column(name = "receiving_type",notNull = true, defVal = "1", note = "收款类型")
    protected Integer receivingType;

    @Column(name = "receiving_qrcode",length = 255, note = "收款二维码")
    protected String receivingQrcode;

    @Column(name = "handle_type", notNull = true, defVal = "1", note = "处理方式，1：系统自动处理，2：人工处理")
    protected Integer handleType;

    @Column(name = "proof_img", length = 255, note = "凭证图片")
    protected String proofImg;

    @Column(length = 255,note = "处理用户")
    protected String operator;

    @Column(name="handle_date",note = "处理时间")
    protected Date handleDate;

    @Column(name = "reject_note", length = 255, note = "驳回原因")
    protected String rejectNote;

    @Column(notNull = true, defVal = "1", note = "状态")
    protected Integer state;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;
    
    @JoinField(name = "name",fromField = "account_group_id",toTable = "payment_account_group",toField = "id",type = "LEFT")
    protected String accountGroupName;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getAccountGroupId() {
        return accountGroupId;
    }

    public void setAccountGroupId(Long accountGroupId) {
        this.accountGroupId = accountGroupId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Double getProfitProportion() {
        return profitProportion;
    }

    public void setProfitProportion(Double profitProportion) {
        this.profitProportion = profitProportion;
    }

    public Integer getReceiptMoney() {
        return receiptMoney;
    }

    public void setReceiptMoney(Integer receiptMoney) {
        this.receiptMoney = receiptMoney;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getReceivingType() {
        return receivingType;
    }

    public void setReceivingType(Integer receivingType) {
        this.receivingType = receivingType;
    }

    public String getReceivingQrcode() {
        return receivingQrcode;
    }

    public void setReceivingQrcode(String receivingQrcode) {
        this.receivingQrcode = receivingQrcode;
    }

    public Integer getHandleType() {
        return handleType;
    }

    public void setHandleType(Integer handleType) {
        this.handleType = handleType;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getProofImg() {
        return proofImg;
    }

    public void setProofImg(String proofImg) {
        this.proofImg = proofImg;
    }

    public Date getHandleDate() {
        return handleDate;
    }

    public void setHandleDate(Date handleDate) {
        this.handleDate = handleDate;
    }

    public String getRejectNote() {
        return rejectNote;
    }

    public void setRejectNote(String rejectNote) {
        this.rejectNote = rejectNote;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    public String getAccountGroupName() {
		return accountGroupName;
	}

	public void setAccountGroupName(String accountGroupName) {
		this.accountGroupName = accountGroupName;
	}

	public String getReceivingTypeName(){
        return ReceivingMoneyType.note(this.receivingType);
    }

    public String getHandleTypeName(){
        return UserTransferMoneyOrderEnum.HandleType.note(this.handleType);
    }

    public String getMoneyStr(){
        return NumberTools.getMoneyStr(this.money);
    }

    public String getReceiptMoneyStr(){
        return NumberTools.getMoneyStr(this.receiptMoney);
    }

    public String getStateName(){
        return UserTransferMoneyOrderEnum.State.note(this.state);
    }

    public String getPayTypeName(){
        return EPayType.note(this.payType);
    }
}
